function search(str) {
	searchurl = 'http://theodore.ucc.asn.au/ddi/ddi.pl?search='+str;
	$('#results').append("<span id='waiting'> </span>");
	$('#waiting').addClass('spinner');
	$('#waiting').append("Searching, please wait...");
	$('#waiting').append("<img src='./spin.gif' style='margin-left:50px;' />");

	$.getJSON(searchurl,
			function(json) {
			$.each(json.results, function(index,value) {
				$('#results').append("<p>");
				$('#results').append("<b>"+value.category+"</b> - Matches: "+value.matches);
				$('#results').append("</p>");
				})
			$('#waiting').toggle();
			}
		 );
}
